import { _decorator, Component, Node ,Animation, AnimationState} from 'cc';
import { Block } from './Block';
const { ccclass, property } = _decorator;

@ccclass('River')
export class River extends Block {
    
    start() {
        let ani:Animation=this.node.getComponent(Animation);
        //ani.play("river");

        let s:AnimationState=ani.getState("river");
        //console.log(s.duration);

        this.schedule(()=>{
            ani.stop();
            ani.play("river");
        },s.duration,50000,s.duration);
    }
}


